package com.topisv.tms.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.WarehouseArea;

/**
 * 
 *
 * @author yuansheng
 * @version 1.0.0
 */
public interface WarehouseAreaDao extends PagingAndSortingRepository<WarehouseArea, Long>, JpaSpecificationExecutor<WarehouseArea>  {

    @Query("select t from WarehouseArea t where t.warehouseCode=?1 AND t.customerCode=?2")
    List<WarehouseArea> findByWarehouseAndCustomer(String warehouseCode,String customerCode);
    
}
